<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    
<%@page import="java.util.*"%>
<%@page import="edu.byu.isys413.group1E.handlers.*"%>
<%@page import="edu.byu.isys413.group1E.data.*"%>
<%@page import="java.util.ArrayList.*"%>
<%@page import="java.text.DecimalFormat"%>

<%   
ArrayList<ConceptualBO> catalog = (ArrayList<ConceptualBO>)request.getAttribute("catalog");
DecimalFormat fmt = new DecimalFormat();
fmt.setMinimumFractionDigits(2);
fmt.setMaximumFractionDigits(2);    
%>
    
    
    
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>MyStuff Catalog</title>
<style type="text/css">
<!--
body,td,th {
	font-family: tahoma;
}
body {
	background-color: #354153;
}
.title {background-color: #708BB2; 
color:#FFFFFF; padding:5px; 
font-size:12px; 
font-weight:bold; 
border:1px solid; 
width:492px;
}
.tablething {border-collapse:collapse; color:#FFFFFF; font-size:10px; border-top:0px; border-left:2px solid;
}
.add
{
background-image:url(images/add.gif); 
width:12px; 
height:12px; 
border:0px; 
padding:0px; 
margin:0px;
}
-->
</style></head>

<body>
<div class="title">
  <table border="0" cellspacing="0" cellpadding="3" style="padding:0px;">
    <tr>
      <td width="25"><img src="images/product.gif" width="25" height="23" /></td>
      <td width="197">MyStuff Product Catalog </td>
	  <form class="searchbox" action method="get">
	  <td width="138" align="right">&nbsp;</td>					
	  <td width="102">&nbsp;</td>
	  </form><td width="0"></td>
    </tr>
  </table>
</div>
<div style="background-image:url(images/camera.jpg); background-position:center; background-repeat:no-repeat; border-color:#FFFFFF; height:340px; width:502px; overflow:auto; border:1px solid; border-color:#FFFFFF; " align="right">

  <table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolor="#FFFFFF"  class="tablething" style="border:0px; border-bottom:1px solid; border-color:#FFFFFF; border-top:0px;">
    <%for(int counter = 0; counter<catalog.size(); counter++) {   %>

    <tr><form id="additem<%=counter%>" name="additem<%=counter%>" method="post" target="cart" action="edu.byu.isys413.actions.checkout.action">
      <td><%=catalog.get(counter).getCategory()%></td>
      <td><%=catalog.get(counter).getProductName()%></td>
      <td><%=catalog.get(counter).getDescription()%></td>
      <td width="30" align="right">
        <select name="qty" style="font-size:10px; border:0px;">
          <option selected="selected">1</option>
          <option>2</option>
          <option>3</option>
          <option>4</option>
          <option>5</option>
          <option>6</option>
          <option>7</option>
          <option>8</option>
          <option>9</option>
          <option>10</option>
        </select>      </td>
        <%String str = fmt.format(catalog.get(counter).getPrice());  %>
      <td width="30" align="right"><%=str%></td>
      <td width="10">
	  <input type="hidden" name="SKU"   value="<%=catalog.get(counter).getSKU()%>" />

      <input type="submit" name="Submit" value=""  class="add" />	 
		</td>
   </form> </tr>
    <% }//end for Loop    %>
  </table>
</div>
</body>
</html>
